package com.xinsoft.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xinsoft.entity.dto.SysMaterialParam;
import com.xinsoft.entity.po.SysMaterial;
import com.xinsoft.entity.vo.SysMaterialDetailVo;
import com.xinsoft.entity.vo.SysMaterialVo;
import org.json.JSONObject;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
* @author xuhb
* @description 针对表【sys_material(物料)】的数据库操作Service
* @createDate 2023-05-23 13:14:54
*/
public interface SysMaterialService extends IService<SysMaterial> {

    public IPage<SysMaterialVo> listPageMaterial(SysMaterialParam param, HttpServletRequest request);

    public String saveMaterial(SysMaterial material);

    public String editMaterial(SysMaterial material);

    public void deleteMaterial(List<Integer> ids);

    public SysMaterialDetailVo getMaterialDetail(Integer id);

    JSONObject importExcel(MultipartFile multipartFile, HttpServletResponse response) throws IOException;

    List<Map<Integer, Integer>> getPrecision(List<Integer> ids);

    void insertOrUpdateBatch(List<SysMaterial> sysMaterialList);
}
